package com.bwie.es;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@Document(indexName = "es_visitor")
public class EsVisitor {
    @Id
    @Field(type = FieldType.Integer)
    private Integer id;
    @Field(type = FieldType.Text)
    private String visitorName;
    @Field(type = FieldType.Text)
    private String visitorPhone;
    @Field(type = FieldType.Text)
    private String visitorCard;
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date visitorDatetime;
    @Field(type = FieldType.Text)
    private String visitorSex;
    @Field(type = FieldType.Text)
    private String visitorFirm;
    @Field(type = FieldType.Text)
    private String visitorPlate;
    @Field(type = FieldType.Integer)
    private Integer reasonId;
    @Field(type = FieldType.Text)
    private String visitorTeam;
    @Field(type = FieldType.Text)
    private String visitorPeople;

    @Field(type = FieldType.Text)
    private String reasonName;

    @Field(type = FieldType.Text)
    private String onename;

    @Field(type = FieldType.Text)
    private String twoname;

}
